home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #3 / Amiga Plus CD - 2002 - No. 03.iso / AmigaPlus / Tools / Development / envCPP31 / c++ / tools / gnu-indent / docs / indent.info < prev    next >
Encoding:
GNU Info File  |  2002-01-01  |  56.0 KB  |  1,665 lines

  1. This is indent.info, produced by makeinfo version 4.0 from
  2. indent.texinfo.
  3.  
  4. INFO-DIR-SECTION Indent Code Formatter
  5. START-INFO-DIR-ENTRY
  6. * Indent: (indent).        C code formatter.
  7. END-INFO-DIR-ENTRY
  8.  
  9.    This is Edition 2.2.6 of `The `indent' Manual', for Indent Version
  10. 2.2.6, last updated 16 November 2000.
  11.  
  12.    Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996 Free Software
  13. Foundation, Inc.  Copyright (C) 1995, 1996 Joseph Arceneaux.  Copyright
  14. (C) 1999 Carlo Wood.
  15.  
  16.    Permission is granted to make and distribute verbatim copies of this
  17. manual provided the copyright notice and this permission notice are
  18. preserved on all copies.
  19.  
  20. 
  21. File: indent.info,  Node: Top,  Next: Indent Program,  Prev: (dir),  Up: (dir)
  22.  
  23. `indent':  Indent and Format C Program Source
  24. *********************************************
  25.  
  26.    The `indent' program changes the appearance of a C program by
  27. inserting or deleting whitespace.
  28.  
  29.    This is Edition 2.2.6, 16 November 2000, of `The `indent' Manual',
  30. for Indent Version 2.2.6.
  31.  
  32. * Menu:
  33.  
  34. * Indent Program::              The `indent' Program
  35. * Option Summary::              Option Summary
  36. * Index::                       Index
  37.  
  38. 
  39. File: indent.info,  Node: Indent Program,  Next: Option Summary,  Prev: Top,  Up: Top
  40.  
  41. The `indent' Program
  42. ********************
  43.  
  44.    The `indent' program can be used to make code easier to read.  It
  45. can also convert from one style of writing C to another.
  46.  
  47.    `indent' understands a substantial amount about the syntax of C, but
  48. it also attempts to cope with incomplete and misformed syntax.
  49.  
  50.    In version 1.2 and more recent versions, the GNU style of indenting
  51. is the default.
  52.  
  53. * Menu:
  54.  
  55. * Invoking indent::             Invoking `indent'
  56. * Backup files::                Backup Files
  57. * Common styles::               Common styles
  58. * Blank lines::                 Blank lines
  59. * Comments::                    Comments
  60. * Statements::                  Statements
  61. * Declarations::                Declarations
  62. * Indentation::                 Indentation
  63. * Breaking long lines::         Breaking long lines
  64. * Disabling Formatting::        Disabling Formatting
  65. * Miscellaneous options::       Miscellaneous options
  66. * Bugs::                     Bugs
  67. * Copyright::                   Copyright
  68.  
  69. 
  70. File: indent.info,  Node: Invoking indent,  Next: Backup files,  Up: Indent Program
  71.  
  72. Invoking `indent'
  73. =================
  74.  
  75.    As of version 1.3, the format of the `indent' command is:
  76.  
  77.  
  78.      indent [OPTIONS] [INPUT-FILES]
  79.      
  80.      indent [OPTIONS] [SINGLE-INPUT-FILE] [-o OUTPUT-FILE]
  81.  
  82.    This format is different from earlier versions and other versions of
  83. `indent'.
  84.  
  85.    In the first form, one or more input files are specified.  `indent'
  86. makes a backup copy of each file, and the original file is replaced with
  87. its indented version.  *Note Backup files::, for an explanation of how
  88. backups are made.
  89.  
  90.    In the second form, only one input file is specified.  In this case,
  91. or when the standard input is used, you may specify an output file after
  92. the `-o' option.
  93.  
  94.    To cause `indent' to write to standard output, use the `-st' option.
  95. This is only allowed when there is only one input file, or when the
  96. standard input is used.
  97.  
  98.    If no input files are named, the standard input is read for input.
  99. Also, if a filename named `-' is specified, then the standard input is
  100. read.
  101.  
  102.    As an example, each of the following commands will input the program
  103. `slithy_toves.c' and write its indented text to `slithy_toves.out':
  104.  
  105.  
  106.      indent slithy_toves.c -o slithy_toves.out
  107.      
  108.      indent -st slithy_toves.c > slithy_toves.out
  109.      
  110.      cat slithy_toves.c | indent -o slithy_toves.out
  111.  
  112.    Most other options to `indent' control how programs are formatted.
  113. As of version 1.2, `indent' also recognizes a long name for each option
  114. name.  Long options are prefixed by either `--' or `+'.(1) In most of
  115. this document, the traditional, short names are used for the sake of
  116. brevity.  *Note Option Summary::, for a list of options, including both
  117. long and short names.
  118.  
  119.    Here is another example:
  120.  
  121.      indent -br test/metabolism.c -l85
  122.  
  123.    This will indent the program `test/metabolism.c' using the `-br' and
  124. `-l85' options, write the output back to `test/metabolism.c', and write
  125. the original contents of `test/metabolism.c' to a backup file in the
  126. directory `test'.
  127.  
  128.    Equivalent invocations using long option names for this example would
  129. be:
  130.  
  131.  
  132.      indent --braces-on-if-line --line-length185 test/metabolism.c
  133.      
  134.      indent +braces-on-if-line +line-length185 test/metabolism.c
  135.  
  136.    If you find that you often use `indent' with the same options, you
  137. may put those options into a file named `.indent.pro'.  `indent' will
  138. first look for `.indent.pro' in the current directory and use that if
  139. found.  Otherwise, `indent' will search your home directory for
  140. `.indent.pro' and use that file if it is found.  This behaviour is
  141. different from that of other versions of `indent', which load both
  142. files if they both exist.
  143.  
  144.    The format of `.indent.pro' is simply a list of options, just as
  145. they would appear on the command line, separated by white space (tabs,
  146. spaces, and newlines).  Options in `.indent.pro' may be surrounded by C
  147. or C++ comments, in which case they are ignored.
  148.  
  149.    Command line switches are handled _after_ processing `.indent.pro'.
  150. Options specified later override arguments specified earlier, with one
  151. exception: Explicitly specified options always override background
  152. options (*note Common styles::).  You can prevent `indent' from reading
  153. an `.indent.pro' file by specifying the `-npro' option.
  154.  
  155.    ---------- Footnotes ----------
  156.  
  157.    (1)  `+' is being superseded by `--' to maintain consistency with
  158. the POSIX standard.
  159.  
  160. 
  161. File: indent.info,  Node: Backup files,  Next: Common styles,  Prev: Invoking indent,  Up: Indent Program
  162.  
  163. Backup Files
  164. ============
  165.  
  166.    As of version 1.3, GNU `indent' makes GNU-style backup files, the
  167. same way GNU Emacs does.  This means that either "simple" or "numbered"
  168. backup filenames may be made.
  169.  
  170.    Simple backup file names are generated by appending a suffix to the
  171. original file name.  The default for this suffix is the one-character
  172. string `~' (tilde).  Thus, the backup file for `python.c' would be
  173. `python.c~'.
  174.  
  175.    Instead of the default, you may specify any string as a suffix by
  176. setting the environment variable `SIMPLE_BACKUP_SUFFIX' to your
  177. preferred suffix.
  178.  
  179.    Numbered backup versions of a file `momeraths.c' look like
  180. `momeraths.c.~23~', where 23 is the version of this particular backup.
  181. When making a numbered backup of the file `src/momeraths.c', the backup
  182. file will be named `src/momeraths.c.~V~', where V is one greater than
  183. the highest version currently existing in the directory `src'.  The
  184. environment variable `VERSION_WIDTH' controls the number of digits,
  185. using left zero padding when necessary.  For instance, setting this
  186. variable to "2" will lead to the backup file being named
  187. `momeraths.c.~04~'.
  188.  
  189.    The type of backup file made is controlled by the value of the
  190. environment variable `VERSION_CONTROL'.  If it is the string `simple',
  191. then only simple backups will be made.  If its value is the string
  192. `numbered', then numbered backups will be made.  If its value is
  193. `numbered-existing', then numbered backups will be made if there
  194. _already exist_ numbered backups for the file being indented;
  195. otherwise, a simple backup is made.  If `VERSION_CONTROL' is not set,
  196. then `indent' assumes the behaviour of `numbered-existing'.
  197.  
  198.    Other versions of `indent' use the suffix `.BAK' in naming backup
  199. files.  This behaviour can be emulated by setting
  200. `SIMPLE_BACKUP_SUFFIX' to `.BAK'.
  201.  
  202.    Note also that other versions of `indent' make backups in the
  203. current directory, rather than in the directory of the source file as
  204. GNU `indent' now does.
  205.  
  206. 
  207. File: indent.info,  Node: Common styles,  Next: Blank lines,  Prev: Backup files,  Up: Indent Program
  208.  
  209. Common styles
  210. =============
  211.  
  212.    There are several common styles of C code, including the GNU style,
  213. the Kernighan & Ritchie style, and the original Berkeley style.  A
  214. style may be selected with a single "background" option, which
  215. specifies a set of values for all other options.  However, explicitly
  216. specified options always override options implied by a background
  217. option.
  218.  
  219.    As of version 1.2, the default style of GNU `indent' is the GNU
  220. style.  Thus, it is no longer necessary to specify the option `-gnu' to
  221. obtain this format, although doing so will not cause an error.  Option
  222. settings which correspond to the GNU style are:
  223.  
  224.      -nbad -bap -nbc -bbo -bl -bli2 -bls -ncdb -nce -cp1 -cs -di2
  225.      -ndj -nfc1 -nfca -hnl -i2 -ip5 -lp -pcs -nprs -psl -saf -sai
  226.      -saw -nsc -nsob
  227.  
  228.    The GNU coding style is that preferred by the GNU project.  It is the
  229. style that the GNU Emacs C mode encourages and which is used in the C
  230. portions of GNU Emacs.  (People interested in writing programs for
  231. Project GNU should get a copy of `The GNU Coding Standards', which also
  232. covers semantic and portability issues such as memory usage, the size
  233. of integers, etc.)
  234.  
  235.    The Kernighan & Ritchie style is used throughout their well-known
  236. book `The C Programming Language'.  It is enabled with the `-kr'
  237. option.  The Kernighan & Ritchie style corresponds to the following set
  238. of options:
  239.  
  240.      -nbad -bap -bbo -nbc -br -brs -c33 -cd33 -ncdb -ce -ci4 -cli0
  241.      -cp33 -cs -d0 -di1 -nfc1 -nfca -hnl -i4 -ip0 -l75 -lp -npcs
  242.      -nprs -npsl -saf -sai -saw -nsc -nsob -nss
  243.  
  244. Kernighan & Ritchie style does not put comments to the right of code in
  245. the same column at all times (nor does it use only one space to the
  246. right of the code), so for this style `indent' has arbitrarily chosen
  247. column 33.
  248.  
  249.    The style of the original Berkeley `indent' may be obtained by
  250. specifying `-orig' (or by specifying `--original', using the long
  251. option name).  This style is equivalent to the following settings:
  252.  
  253.      -nbad -nbap -bbo -bc -br -brs -c33 -cd33 -cdb -ce -ci4 -cli0
  254.      -cp33 -di16 -fc1 -fca -hnl -i4 -ip4 -l75 -lp -npcs -nprs -psl
  255.      -saf -sai -saw -sc -nsob -nss -ts8
  256.  
  257. 
  258. File: indent.info,  Node: Blank lines,  Next: Comments,  Prev: Common styles,  Up: Indent Program
  259.  
  260. Blank lines
  261. ===========
  262.  
  263.    Various programming styles use blank lines in different places.
  264. `indent' has a number of options to insert or delete blank lines in
  265. specific places.
  266.  
  267.    The `-bad' option causes `indent' to force a blank line after every
  268. block of declarations.  The `-nbad' option causes `indent' not to force
  269. such blank lines.
  270.  
  271.    The `-bap' option forces a blank line after every procedure body.
  272. The `-nbap' option forces no such blank line.
  273.  
  274.    The `-bbb' option forces a blank line before every boxed comment,
  275. *Note Comments::. The `-nbbb' option does not force such blank lines.
  276.  
  277.    The `-sob' option causes `indent' to swallow optional blank lines
  278. (that is, any optional blank lines present in the input will be removed
  279. from the output).  If the `-nsob' is specified, any blank lines present
  280. in the input file will be copied to the output file.
  281.  
  282. * Menu:
  283.  
  284. * -bad::                        More on the `-bad' option.
  285. * -bap::                        More on the `-bap' option.
  286.  
  287. 
  288. File: indent.info,  Node: -bad,  Next: -bap,  Up: Blank lines
  289.  
  290. -blank-lines-after-declarations
  291. -------------------------------
  292.  
  293.    The `-bad' option forces a blank line after every block of
  294. declarations.  The `-nbad' option does not add any such blank lines.
  295.  
  296.    For example, given the input
  297.      char *foo;
  298.      char *bar;
  299.      /* This separates blocks of declarations.  */
  300.      int baz;
  301.  
  302. `indent -bad' produces
  303.  
  304.      char *foo;
  305.      char *bar;
  306.      
  307.      /* This separates blocks of declarations.  */
  308.      int baz;
  309.  
  310. and `indent -nbad' produces
  311.  
  312.      char *foo;
  313.      char *bar;
  314.      /* This separates blocks of declarations.  */
  315.      int baz;
  316.  
  317. 
  318. File: indent.info,  Node: -bap,  Prev: -bad,  Up: Blank lines
  319.  
  320. -blank-lines-after-procedures
  321. -----------------------------
  322.  
  323.    The `-bap' option forces a blank line after every procedure body.
  324.  
  325.    For example, given the input
  326.  
  327.      int
  328.      foo ()
  329.      {
  330.        puts("Hi");
  331.      }
  332.      /* The procedure bar is even less interesting.  */
  333.      char *
  334.      bar ()
  335.      {
  336.        puts("Hello");
  337.      }
  338.  
  339. `indent -bap' produces
  340.  
  341.      int
  342.      foo ()
  343.      {
  344.        puts ("Hi");
  345.      }
  346.      
  347.      /* The procedure bar is even less interesting.  */
  348.      char *
  349.      bar ()
  350.      {
  351.        puts ("Hello");
  352.      }
  353.  
  354. and `indent -nbap' produces
  355.  
  356.      int
  357.      foo ()
  358.      {
  359.        puts ("Hi");
  360.      }
  361.      /* The procedure bar is even less interesting.  */
  362.      char *
  363.      bar ()
  364.      {
  365.        puts ("Hello");
  366.      }
  367.  
  368. No blank line will be added after the procedure `foo'.
  369.  
  370. 
  371. File: indent.info,  Node: Comments,  Next: Statements,  Prev: Blank lines,  Up: Indent Program
  372.  
  373. Comments
  374. ========
  375.  
  376.    `indent' formats both C and C++ comments. C comments are begun with
  377. `/*', terminated with `*/' and may contain newline characters.  C++
  378. comments begin with the delimiter `//' and end at the newline.
  379.  
  380.    `indent' handles comments differently depending upon their context.
  381. `indent' attempts to distinguish between comments which follow
  382. statements, comments which follow declarations, comments following
  383. preprocessor directives, and comments which are not preceded by code of
  384. any sort, i.e., they begin the text of the line (although not
  385. neccessarily in column 1).
  386.  
  387.    `indent' further distinguishes between comments found outside of
  388. procedures and aggregates, and those found within them.  In particular,
  389. comments beginning a line found within a procedure will be indented to
  390. the column at which code is currently indented.  The exception to this a
  391. comment beginning in the leftmost column;  such a comment is output at
  392. that column.
  393.  
  394.    `indent' attempts to leave "boxed comments" unmodified.  The general
  395. idea of such a comment is that it is enclosed in a rectangle or "box"
  396. of stars or dashes to visually set it apart.  More precisely, boxed
  397. comments are defined as those in which the initial `/*' is followed
  398. immediately by the character `*', `=', `_', or `-', or those in which
  399. the beginning comment delimiter (`/*') is on a line by itself, and the
  400. following line begins with a `*' in the same column as the star of the
  401. opening delimiter.
  402.  
  403.    Examples of boxed comments are:
  404.  
  405.      /**********************
  406.       * Comment in a box!! *
  407.       **********************/
  408.      
  409.             /*
  410.              * A different kind of scent,
  411.              * for a different kind of comment.
  412.              */
  413.  
  414.    `indent' attempts to leave boxed comments exactly as they are found
  415. in the source file.  Thus the indentation of the comment is unchanged,
  416. and its length is not checked in any way.  The only alteration made is
  417. that an embedded tab character may be converted into the appropriate
  418. number of spaces.
  419.  
  420.    If the `-bbb' option is specified, all such boxed comments will be
  421. preceded by a blank line, unless such a comment is preceded by code.
  422.  
  423.    Comments which are not boxed comments may be formatted, which means
  424. that the line is broken to fit within a right margin and left-filled
  425. with whitespace.  Single newlines are equivalent to a space, but blank
  426. lines (two or more newlines in a row) are taken to mean a paragraph
  427. break.  Formatting of comments which begin after the first column is
  428. enabled with the `-fca' option.  To format those beginning in column
  429. one, specify `-fc1'.  Such formatting is disabled by default.
  430.  
  431.    The right margin for formatting defaults to 78, but may be changed
  432. with the `-lc' option.  If the margin specified does not allow the
  433. comment to be printed, the margin will be automatically extended for the
  434. duration of that comment.  The margin is not respected if the comment is
  435. not being formatted.
  436.  
  437.    If the comment begins a line (i.e., there is no program text to its
  438. left), it will be indented to the column it was found in unless the
  439. comment is within a block of code.  In that case, such a comment will be
  440. aligned with the indented code of that block (unless the comment began
  441. in the first column).  This alignment may be affected by the `-d'
  442. option, which specifies an amount by which such comments are moved to
  443. the _left_, or unindented.  For example, `-d2' places comments two
  444. spaces to the left of code.  By default, comments are aligned with
  445. code, unless they begin in the first column, in which case they are left
  446. there by default -- to get them aligned with the code, specify `-fc1'.
  447.  
  448.    Comments to the right of code will appear by default in column 33.
  449. This may be changed with one of three options.  `-c' will specify the
  450. column for comments following code, `-cd' specifies the column for
  451. comments following declarations, and `-cp' specifies the column for
  452. comments following preprocessor directives `#else' and `#endif'.
  453.  
  454.    If the code to the left of the comment exceeds the beginning column,
  455. the comment column will be extended to the next tabstop column past the
  456. end of the code, or in the case of preprocessor directives, to one
  457. space past the end of the directive.  This extension lasts only for the
  458. output of that particular comment.
  459.  
  460.    The `-cdb' option places the comment delimiters on blank lines.
  461. Thus, a single line comment like `/* Loving hug */' can be transformed
  462. into:
  463.  
  464.      /*
  465.         Loving hug
  466.       */
  467.  
  468.    Stars can be placed at the beginning of multi-line comments with the
  469. `-sc' option.  Thus, the single-line comment above can be transformed
  470. (with `-cdb -sc') into:
  471.  
  472.      /*
  473.       * Loving hug
  474.       */
  475.  
  476. 
  477. File: indent.info,  Node: Statements,  Next: Declarations,  Prev: Comments,  Up: Indent Program
  478.  
  479. Statements
  480. ==========
  481.  
  482.    The `-br' or `-bl' option specifies how to format braces.
  483.  
  484.    The `-br' option formats statement braces like this:
  485.  
  486.      if (x > 0) {
  487.        x--;
  488.      }
  489.  
  490. The `-bl' option formats them like this:
  491.  
  492.      if (x > 0)
  493.        {
  494.          x--;
  495.        }
  496.  
  497.    If you use the `-bl' option, you may also want to specify the `-bli'
  498. option.  This option specifies the number of spaces by which braces are
  499. indented.  `-bli2', the default, gives the result shown above.  `-bli0'
  500. results in the following:
  501.  
  502.      if (x > 0)
  503.      {
  504.        x--;
  505.      }
  506.  
  507.    If you are using the `-br' option, you probably want to also use the
  508. `-ce' option.  This causes the `else' in an if-then-else construct to
  509. cuddle up to the immediately preceding `}'.  For example, with `-br
  510. -ce' you get the following:
  511.  
  512.      if (x > 0) {
  513.        x--;
  514.      } else {
  515.        fprintf (stderr, "...something wrong?\n");
  516.      }
  517.  
  518. With `-br -nce' that code would appear as
  519.  
  520.      if (x > 0) {
  521.        x--;
  522.      }
  523.      else {
  524.        fprintf (stderr, "...something wrong?\n");
  525.      }
  526.  
  527.    This causes the `while' in a do-while loop to cuddle up to the
  528. immediately preceding `}'.  For example, with `-cdw' you get the
  529. following:
  530.  
  531.      do {
  532.        x--;
  533.      } while (x);
  534.  
  535. With `-ncdw' that code would appear as
  536.  
  537.      do {
  538.        x--;
  539.      }
  540.      while (x);
  541.  
  542.    The `-cli' option specifies the number of spaces that case labels
  543. should be indented to the right of the containing `switch' statement.
  544.  
  545. The default gives code like:
  546.  
  547.      switch (i)
  548.        {
  549.        case 0:
  550.          break;
  551.        case 1:
  552.          {
  553.            ++i;
  554.          }
  555.        default:
  556.          break;
  557.        }
  558.  
  559.    Using the `-cli2' that would become:
  560.  
  561.      switch (i)
  562.        {
  563.          case 0:
  564.            break;
  565.          case 1:
  566.            {
  567.              ++i;
  568.            }
  569.          default:
  570.            break;
  571.        }
  572.  
  573.    The indentation of the braces below a case statement can be
  574. controlled with the `-cbiN' option.  For example, using `-cli2 -cbi0'
  575. results in:
  576.  
  577.      switch (i)
  578.        {
  579.          case 0:
  580.            break;
  581.          case 1:
  582.          {
  583.            ++i;
  584.          }
  585.          default:
  586.            break;
  587.        }
  588.  
  589.    If a semicolon is on the same line as a `for' or `while' statement,
  590. the `-ss' option will cause a space to be placed before the semicolon.
  591. This emphasizes the semicolon, making it clear that the body of the
  592. `for' or `while' statement is an empty statement.  `-nss' disables this
  593. feature.
  594.  
  595.    The `-pcs' option causes a space to be placed between the name of
  596. the procedure being called and the `(' (for example, `puts ("Hi");'.
  597. The `-npcs' option would give `puts("Hi");').
  598.  
  599.    If the `-cs' option is specified, `indent' puts a space after a cast
  600. operator.
  601.  
  602.    The `-bs' option ensures that there is a space between the keyword
  603. `sizeof' and its argument.  In some versions, this is known as the
  604. `Bill_Shannon' option.
  605.  
  606.    The `-saf' option forces a space between an `for' and the following
  607. parenthesis.  This is the default.
  608.  
  609.    The `-sai' option forces a space between an `if' and the following
  610. parenthesis.  This is the default.
  611.  
  612.    The `-saw' option forces a space between an `while' and the
  613. following parenthesis.  This is the default.
  614.  
  615.    The `-prs' option causes all parentheses to be seperated with a
  616. space from the what is between them.  For example, using `-prs' results
  617. in code like:
  618.  
  619.        while ( ( e_code - s_code ) < ( dec_ind - 1 ) )
  620.          {
  621.            set_buf_break ( bb_dec_ind );
  622.            *e_code++ = ' ';
  623.          }
  624.  
  625. 
  626. File: indent.info,  Node: Declarations,  Next: Indentation,  Prev: Statements,  Up: Indent Program
  627.  
  628. Declarations
  629. ============
  630.  
  631.    By default `indent' will line up identifiers, in the column
  632. specified by the `-di' option.  For example, `-di16' makes things look
  633. like:
  634.  
  635.      int             foo;
  636.      char           *bar;
  637.  
  638.    Using a small value (such as one or two) for the `-di' option can be
  639. used to cause the identifiers to be placed in the first available
  640. position; for example:
  641.  
  642.      int foo;
  643.      char *bar;
  644.  
  645.    The value given to the `-di' option will still affect variables
  646. which are put on separate lines from their types, for example `-di2'
  647. will lead to:
  648.  
  649.      int
  650.        foo;
  651.  
  652.    If the `-bc' option is specified, a newline is forced after each
  653. comma in a declaration.  For example,
  654.  
  655.      int a,
  656.        b,
  657.        c;
  658.  
  659. With the `-nbc' option this would look like
  660.  
  661.      int a, b, c;
  662.  
  663.    The `-bfda' option causes a newline to be forced after the comma
  664. separating the arguments of a function declaration.  The arguments will
  665. appear at the current indention level matching the opening paren.  This
  666. is particularly helpful for functions with long argument lists.   For
  667. example,
  668.  
  669.      void foo (int arg1, char arg2, int *arg3, long arg4, char arg5);
  670.  
  671. With the `-bfda' option this would look like
  672.  
  673.      void foo (int arg1,
  674.                char arg2,
  675.                int *arg3,
  676.                long arg4,
  677.                char arg5);
  678.  
  679.    The `-psl' option causes the type of a procedure being defined to be
  680. placed on the line before the name of the procedure.  This style is
  681. required for the `etags' program to work correctly, as well as some of
  682. the `c-mode' functions of Emacs.
  683.  
  684.    You must use the `-T' option to tell `indent' the name of all the
  685. typenames in your program that are defined by `typedef'.  `-T' can be
  686. specified more than once, and all names specified are used.  For
  687. example, if your program contains
  688.  
  689.      typedef unsigned long CODE_ADDR;
  690.      typedef enum {red, blue, green} COLOR;
  691.  
  692. you would use the options `-T CODE_ADDR -T COLOR'.
  693.  
  694.    The `-brs' or `-bls' option specifies how to format braces in struct
  695. declarations.  The `-brs' option formats braces like this:
  696.  
  697.      struct foo {
  698.        int x;
  699.      };
  700.  
  701. The `-bls' option formats them like this:
  702.  
  703.      struct foo
  704.      {
  705.        int x;
  706.      };
  707.  
  708. 
  709. File: indent.info,  Node: Indentation,  Next: Breaking long lines,  Prev: Declarations,  Up: Indent Program
  710.  
  711. Indentation
  712. ===========
  713.  
  714.    One issue in the formatting of code is how far each line should be
  715. indented from the left margin.  When the beginning of a statement such
  716. as `if' or `for' is encountered, the indentation level is increased by
  717. the value specified by the `-i' option.  For example, use `-i8' to
  718. specify an eight character indentation for each level.  When a
  719. statement is broken across two lines, the second line is indented by a
  720. number of additional spaces specified by the `-ci' option.  `-ci'
  721. defaults to 0.  However, if the `-lp' option is specified, and a line
  722. has a left parenthesis which is not closed on that line, then
  723. continuation lines will be lined up to start at the character position
  724. just after the left parenthesis.  This processing also applies to `['
  725. and applies to `{' when it occurs in initialization lists.  For
  726. example, a piece of continued code might look like this with `-nlp
  727. -ci3' in effect:
  728.  
  729.        p1 = first_procedure (second_procedure (p2, p3),
  730.           third_procedure (p4, p5));
  731.  
  732. With `-lp' in effect the code looks somewhat clearer:
  733.  
  734.        p1 = first_procedure (second_procedure (p2, p3),
  735.                              third_procedure (p4, p5));
  736.  
  737.    When a statement is broken in between two or more paren pairs (...),
  738. each extra pair causes the indentation level extra indentation:
  739.  
  740.      if ((((i < 2 &&
  741.              k > 0) || p == 0) &&
  742.          q == 1) ||
  743.        n = 0)
  744.  
  745. The option `-ipN' can be used to set the extra offset per paren.  For
  746. instance, `-ip0' would format the above as:
  747.  
  748.      if ((((i < 2 &&
  749.        k > 0) || p == 0) &&
  750.        q == 1) ||
  751.        n = 0)
  752.  
  753. `indent' assumes that tabs are placed at regular intervals of both
  754. input and output character streams.  These intervals are by default 8
  755. columns wide, but (as of version 1.2) may be changed by the `-ts'
  756. option.  Tabs are treated as the equivalent number of spaces.
  757.  
  758.    The indentation of type declarations in old-style function
  759. definitions is controlled by the `-ip' parameter.  This is a numeric
  760. parameter specifying how many spaces to indent type declarations.  For
  761. example, the default `-ip5' makes definitions look like this:
  762.  
  763.      char *
  764.      create_world (x, y, scale)
  765.           int x;
  766.           int y;
  767.           float scale;
  768.      {
  769.        . . .
  770.      }
  771.  
  772.    For compatibility with other versions of indent, the option `-nip'
  773. is provided, which is equivalent to `-ip0'.
  774.  
  775.    ANSI C allows white space to be placed on preprocessor command lines
  776. between the character `#' and the command name.  By default, `indent'
  777. removes this space, but specifying the `-lps' option directs `indent'
  778. to leave this space unmodified.
  779.  
  780. 
  781. File: indent.info,  Node: Breaking long lines,  Next: Disabling Formatting,  Prev: Indentation,  Up: Indent Program
  782.  
  783. Breaking long lines
  784. ===================
  785.  
  786.    With the option `-lN', or `--line-lengthN', it is possible to
  787. specify the maximum length of a line of C code, not including possible
  788. comments that follow it.
  789.  
  790.    When lines become longer then the specified line length, GNU `indent'
  791. tries to break the line at a logical place.  This is new as of version
  792. 2.1 however and not very intelligent or flexible yet.
  793.  
  794.    Currently there are two options that allows one to interfere with the
  795. algorithm that determines where to break a line.
  796.  
  797.    The `-bbo' option causes GNU `indent' to prefer to break long lines
  798. before the boolean operators `&&' and `||'.  The `-nbbo' option causes
  799. GNU `indent' not have that preference.  For example, the default option
  800. `-bbo' (together with `--line-length60' and `--ignore-newlines') makes
  801. code look like this:
  802.  
  803.        if (mask
  804.            && ((mask[0] == '\0')
  805.                || (mask[1] == '\0'
  806.                    && ((mask[0] == '0') || (mask[0] == '*')))))
  807.  
  808.    Using the option `-nbbo' will make it look like this:
  809.  
  810.        if (mask &&
  811.            ((mask[0] == '\0') ||
  812.             (mask[1] == '\0' &&
  813.              ((mask[0] == '0') || (mask[0] == '*')))))
  814.  
  815.    The default `-hnl', however, honours newlines in the input file by
  816. giving them the highest possible priority to break lines at.  For
  817. example, when the input file looks like this:
  818.  
  819.        if (mask
  820.            && ((mask[0] == '\0')
  821.            || (mask[1] == '\0' && ((mask[0] == '0') || (mask[0] == '*')))))
  822.  
  823. then using the option `-hnl', or `--honour-newlines', together with the
  824. previously mentioned `-nbbo' and `--line-length60', will cause the
  825. output not to be what is given in the last example but instead will
  826. prefer to break at the positions where the code was broken in the input
  827. file:
  828.  
  829.        if (mask
  830.            && ((mask[0] == '\0')
  831.                || (mask[1] == '\0' &&
  832.                    ((mask[0] == '0') || (mask[0] == '*')))))
  833.  
  834.    The idea behind this option is that lines which are too long, but
  835. are already broken up, will not be touched by GNU `indent'.  Really
  836. messy code should be run through `indent' at least once using the
  837. `--ignore-newlines' option though.
  838.  
  839. 
  840. File: indent.info,  Node: Disabling Formatting,  Next: Miscellaneous options,  Prev: Breaking long lines,  Up: Indent Program
  841.  
  842. Disabling Formatting
  843. ====================
  844.  
  845.    Formatting of C code may be disabled for portions of a program by
  846. embedding special "control comments" in the program.  To turn off
  847. formatting for a section of a program, place the disabling control
  848. comment `/* *INDENT-OFF* */' on a line by itself just before that
  849. section.  Program text scanned after this control comment is output
  850. precisely as input with no modifications until the corresponding
  851. enabling comment is scanned on a line by itself.  The disabling control
  852. comment is `/* *INDENT-ON* */', and any text following the comment on
  853. the line is also output unformatted.  Formatting begins again with the
  854. input line following the enabling control comment.
  855.  
  856.    More precisely, `indent' does not attempt to verify the closing
  857. delimiter (`*/') for these C comments, and any whitespace on the line
  858. is totally transparent.
  859.  
  860.    These control comments also function in their C++ formats, namely
  861. `// *INDENT-OFF*' and `// *INDENT-ON*'.
  862.  
  863.    It should be noted that the internal state of `indent' remains
  864. unchanged over the course of the unformatted section.  Thus, for
  865. example, turning off formatting in the middle of a function and
  866. continuing it after the end of the function may lead to bizarre
  867. results.  It is therefore wise to be somewhat modular in selecting code
  868. to be left unformatted.
  869.  
  870.    As a historical note, some earlier versions of `indent' produced
  871. error messages beginning with `*INDENT**'.  These versions of `indent'
  872. were written to ignore any input text lines which began with such error
  873. messages.  I have removed this incestuous feature from GNU `indent'.
  874.  
  875. 
  876. File: indent.info,  Node: Miscellaneous options,  Next: Bugs,  Prev: Disabling Formatting,  Up: Indent Program
  877.  
  878. Miscellaneous options
  879. =====================
  880.  
  881.    To find out what version of `indent' you have, use the command
  882. `indent -version'.  This will report the version number of `indent',
  883. without doing any of the normal processing.
  884.  
  885.    The `-v' option can be used to turn on verbose mode.  When in
  886. verbose mode, `indent' reports when it splits one line of input into
  887. two more more lines of output, and gives some size statistics at
  888. completion.
  889.  
  890.    The `-pmt' option causes `indent' to preserve the access and
  891. modification times on the output files.  Using this option has the
  892. advantage that running indent on all source and header files in a
  893. project won't cause `make' to rebuild all targets.  This option is only
  894. available on Operating Systems that have the POSIX `utime(2)' function.
  895.  
  896. 
  897. File: indent.info,  Node: Bugs,  Next: Copyright,  Prev: Miscellaneous options,  Up: Indent Program
  898.  
  899. Bugs
  900. ====
  901.  
  902.    When `indent' is run twice on a file, with the same profile, it
  903. should _never_ change that file the second time.  With the current
  904. design of `indent', this can not be guaranteed, however, and it has not
  905. been extensively tested.
  906.  
  907.    `indent' does not understand C.  In some cases this leads to the
  908. inability to join lines.  The result is that running a file through
  909. `indent' is _irreversible_, even if the used input file was the result
  910. of running `indent' with a given profile (`.indent.pro').
  911.  
  912.    While an attempt was made to get `indent' working for C++, is will
  913. not do a good job on any C++ source except the very simple.
  914.  
  915.    `indent' does not look at the given `--line-length' option when
  916. writing comments to the output file.  This results often in comments
  917. being put far to the right.  In order to prohibit `indent' from joining
  918. a broken line that has a comment at the end, make sure that the
  919. comments start on the first line of the break.
  920.  
  921.    `indent' does not count lines and comments (see the `-v' option)
  922. when `indent' is turned off with `/* *INDENT-OFF* */'.
  923.  
  924.    Comments of the form `/*UPPERCASE*/' are not treated as comment but
  925. as an identifier, causing them to be joined with the next line. This
  926. renders comments of this type useless, unless they are embedded in the
  927. code to begin with.
  928.  
  929. 
  930. File: indent.info,  Node: Copyright,  Prev: Bugs,  Up: Indent Program
  931.  
  932. Copyright
  933. =========
  934.  
  935.    The following copyright notice applies to the `indent' program.  The
  936. copyright and copying permissions for this manual appear near the
  937. beginning of `indent.texinfo' and `indent.info', and near the end of
  938. `indent.1'.
  939.  
  940.      Copyright (C) 1999 Carlo Wood.
  941.      Copyright (C) 1995, 1996 Joseph Arceneaux.
  942.      Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996 Free Software Foundation
  943.      Copyright (C) 1985 Sun Microsystems, Inc.
  944.      Copyright (C) 1980 The Regents of the University of California.
  945.      Copyright (C) 1976 Board of Trustees of the University of Illinois.
  946.      All rights reserved.
  947.      
  948.      Redistribution and use in source and binary forms are permitted
  949.      provided that the above copyright notice and this paragraph are
  950.      duplicated in all such forms and that any documentation,
  951.      advertising materials, and other materials related to such
  952.      distribution and use acknowledge that the software was developed
  953.      by the University of California, Berkeley, the University of Illinois,
  954.      Urbana, and Sun Microsystems, Inc.  The name of either University
  955.      or Sun Microsystems may not be used to endorse or promote products
  956.      derived from this software without specific prior written permission.
  957.      THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  958.      IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  959.      WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
  960.      PURPOSE.
  961.  
  962. 
  963. File: indent.info,  Node: Option Summary,  Next: Index,  Prev: Indent Program,  Up: Top
  964.  
  965. Option Summary
  966. **************
  967.  
  968.    Here is a list of all the options for `indent', alphabetized by
  969. short option.  It is followed by a cross key alphabetized by long
  970. option.
  971.  
  972. `-bad'
  973. `--blank-lines-after-declarations'
  974.      Force blank lines after the declarations.
  975.      *Note Blank lines::.
  976.  
  977. `-bap'
  978. `--blank-lines-after-procedures'
  979.      Force blank lines after procedure bodies.
  980.      *Note Blank lines::.
  981.  
  982. `-bbb'
  983. `--blank-lines-before-block-comments'
  984.      Force blank lines before block comments.
  985.      *Note Blank lines::.
  986.  
  987. `-bbo'
  988. `--break-before-boolean-operator'
  989.      Prefer to break long lines before boolean operators.
  990.      *Note Breaking long lines::.
  991.  
  992. `-bc'
  993. `--blank-lines-after-commas'
  994.      Force newline after comma in declaration.
  995.      *Note Declarations::.
  996.  
  997. `-bl'
  998. `--braces-after-if-line'
  999.      Put braces on line after `if', etc.
  1000.      *Note Statements::.
  1001.  
  1002. `-bliN'
  1003. `--brace-indentN'
  1004.      Indent braces N spaces.
  1005.      *Note Statements::.
  1006.  
  1007. `-bls'
  1008. `--braces-after-struct-decl-line'
  1009.      Put braces on the line after `struct' declaration lines.
  1010.      *Note Declarations::.
  1011.  
  1012. `-br'
  1013. `--braces-on-if-line'
  1014.      Put braces on line with `if', etc.
  1015.      *Note Statements::.
  1016.  
  1017. `-brs'
  1018. `--braces-on-struct-decl-line'
  1019.      Put braces on `struct' declaration line.
  1020.      *Note Declarations::.
  1021.  
  1022. `-bs'
  1023. `--Bill-Shannon'
  1024. `--blank-before-sizeof'
  1025.      Put a space between `sizeof' and its argument.
  1026.      *Note Statements::.
  1027.  
  1028. `-cN'
  1029. `--comment-indentationN'
  1030.      Put comments to the right of code in column N.
  1031.      *Note Comments::.
  1032.  
  1033. `-cbiN'
  1034. `--case-brace-indentationN'
  1035.      Indent braces after a case label N spaces.
  1036.      *Note Statements::.
  1037.  
  1038. `-cdN'
  1039. `--declaration-comment-columnN'
  1040.      Put comments to the right of the declarations in column N.
  1041.      *Note Comments::.
  1042.  
  1043. `-cdb'
  1044. `--comment-delimiters-on-blank-lines'
  1045.      Put comment delimiters on blank lines.
  1046.      *Note Comments::.
  1047.  
  1048. `-cdw'
  1049. `--cuddle-do-while'
  1050.      Cuddle while of `do {} while;' and preceeding `}'.
  1051.      *Note Comments::.
  1052.  
  1053. `-ce'
  1054. `--cuddle-else'
  1055.      Cuddle else and preceeding `}'.
  1056.      *Note Comments::.
  1057.  
  1058. `-ciN'
  1059. `--continuation-indentationN'
  1060.      Continuation indent of N spaces.
  1061.      *Note Statements::.
  1062.  
  1063. `-cliN'
  1064. `--case-indentationN'
  1065.      Case label indent of N spaces.
  1066.      *Note Statements::.
  1067.  
  1068. `-cpN'
  1069. `--else-endif-columnN'
  1070.      Put comments to the right of `#else' and `#endif' statements in
  1071.      column N.
  1072.      *Note Comments::.
  1073.  
  1074. `-cs'
  1075. `--space-after-cast'
  1076.      Put a space after a cast operator.
  1077.      *Note Statements::.
  1078.  
  1079. `-dN'
  1080. `--line-comments-indentationN'
  1081.      Set indentation of comments not to the right of code to N spaces.
  1082.      *Note Comments::.
  1083.  
  1084. `-bfda'
  1085. `--break-function-decl-args'
  1086.      Align all arguments in a declaration with opening paren.
  1087.      *Note Declarations::.
  1088.  
  1089. `-diN'
  1090. `--declaration-indentationN'
  1091.      Put variables in column N.
  1092.      *Note Declarations::.
  1093.  
  1094. `-fc1'
  1095. `--format-first-column-comments'
  1096.      Format comments in the first column.
  1097.      *Note Comments::.
  1098.  
  1099. `-fca'
  1100. `--format-all-comments'
  1101.      Do not disable all formatting of comments.
  1102.      *Note Comments::.
  1103.  
  1104. `-gnu'
  1105. `--gnu-style'
  1106.      Use GNU coding style.  This is the default.
  1107.      *Note Common styles::.
  1108.  
  1109. `-hnl'
  1110. `--honour-newlines'
  1111.      Prefer to break long lines at the position of newlines in the
  1112.      input.
  1113.      *Note Breaking long lines::.
  1114.  
  1115. `-iN'
  1116. `--indent-levelN'
  1117.      Set indentation level to N spaces.
  1118.      *Note Indentation::.
  1119.  
  1120. `-ipN'
  1121. `--parameter-indentationN'
  1122.      Indent parameter types in old-style function definitions by N
  1123.      spaces.
  1124.      *Note Indentation::.
  1125.  
  1126. `-kr'
  1127. `--k-and-r-style'
  1128.      Use Kernighan & Ritchie coding style.
  1129.      *Note Common styles::.
  1130.  
  1131. `-lN'
  1132. `--line-lengthN'
  1133.      Set maximum line length for non-comment lines to N.
  1134.      *Note Breaking long lines::.
  1135.  
  1136. `-lcN'
  1137. `--comment-line-lengthN'
  1138.      Set maximum line length for comment formatting to N.
  1139.      *Note Comments::.
  1140.  
  1141. `-lp'
  1142. `--continue-at-parentheses'
  1143.      Line up continued lines at parentheses.
  1144.      *Note Indentation::.
  1145.  
  1146. `-lps'
  1147. `--leave-preprocessor-space'
  1148.      Leave space between `#' and preprocessor directive.
  1149.      *Note Indentation::.
  1150.  
  1151. `-nbad'
  1152. `--no-blank-lines-after-declarations'
  1153.      Do not force blank lines after declarations.
  1154.      *Note Blank lines::.
  1155.  
  1156. `-nbap'
  1157. `--no-blank-lines-after-procedures'
  1158.      Do not force blank lines after procedure bodies.
  1159.      *Note Blank lines::.
  1160.  
  1161. `-nbbo'
  1162. `--break-after-boolean-operator'
  1163.      Do not prefer to break long lines before boolean operators.
  1164.      *Note Breaking long lines::.
  1165.  
  1166. `-nbc'
  1167. `--no-blank-lines-after-commas'
  1168.      Do not force newlines after commas in declarations.
  1169.      *Note Declarations::.
  1170.  
  1171. `-nbfda'
  1172. `--dont-break-function-decl-args'
  1173.      Don't put each argument in a function declaration on a seperate
  1174.      line.
  1175.      *Note Declarations::.
  1176.  
  1177. `-ncdb'
  1178. `--no-comment-delimiters-on-blank-lines'
  1179.      Do not put comment delimiters on blank lines.
  1180.      *Note Comments::.
  1181.  
  1182. `-ncdw'
  1183. `--dont-cuddle-do-while'
  1184.      Do not cuddle `}' and the `while' of a `do {} while;'.
  1185.      *Note Statements::.
  1186.  
  1187. `-nce'
  1188. `--dont-cuddle-else'
  1189.      Do not cuddle `}' and `else'.
  1190.      *Note Statements::.
  1191.  
  1192. `-ncs'
  1193. `--no-space-after-casts'
  1194.      Do not put a space after cast operators.
  1195.      *Note Statements::.
  1196.  
  1197. `-nfc1'
  1198. `--dont-format-first-column-comments'
  1199.      Do not format comments in the first column as normal.
  1200.      *Note Comments::.
  1201.  
  1202. `-nfca'
  1203. `--dont-format-comments'
  1204.      Do not format any comments.
  1205.      *Note Comments::.
  1206.  
  1207. `-nhnl'
  1208. `--ignore-newlines'
  1209.      Do not prefer to break long lines at the position of newlines in
  1210.      the input.
  1211.      *Note Breaking long lines::.
  1212.  
  1213. `-nip'
  1214. `--no-parameter-indentation'
  1215.      Zero width indentation for parameters.
  1216.      *Note Indentation::.
  1217.  
  1218. `-nlp'
  1219. `--dont-line-up-parentheses'
  1220.      Do not line up parentheses.
  1221.      *Note Statements::.
  1222.  
  1223. `-npcs'
  1224. `--no-space-after-function-call-names'
  1225.      Do not put space after the function in function calls.
  1226.      *Note Statements::.
  1227.  
  1228. `-nprs'
  1229. `--no-space-after-parentheses'
  1230.      Do not put a space after every '(' and before every ')'.
  1231.      *Note Statements::.
  1232.  
  1233. `-npsl'
  1234. `--dont-break-procedure-type'
  1235.      Put the type of a procedure on the same line as its name.
  1236.      *Note Declarations::.
  1237.  
  1238. `-nsaf'
  1239. `--no-space-after-for'
  1240.      Do not put a space after every `for'.
  1241.      *Note Statements::.
  1242.  
  1243. `-nsai'
  1244. `--no-space-after-if'
  1245.      Do not put a space after every `if'.
  1246.      *Note Statements::.
  1247.  
  1248. `-nsaw'
  1249. `--no-space-after-while'
  1250.      Do not put a space after every `while'.
  1251.      *Note Statements::.
  1252.  
  1253. `-nsc'
  1254. `--dont-star-comments'
  1255.      Do not put the `*' character at the left of comments.
  1256.      *Note Comments::.
  1257.  
  1258. `-nsob'
  1259. `--leave-optional-blank-lines'
  1260.      Do not swallow optional blank lines.
  1261.      *Note Blank lines::.
  1262.  
  1263. `-nss'
  1264. `--dont-space-special-semicolon'
  1265.      Do not force a space before the semicolon after certain statements.
  1266.      Disables `-ss'.
  1267.      *Note Statements::.
  1268.  
  1269. `-nut'
  1270. `--no-tabs'
  1271.      Use spaces instead of tabs.
  1272.      *Note Indentation::.
  1273.  
  1274. `-nv'
  1275. `--no-verbosity'
  1276.      Disable verbose mode.
  1277.      *Note Miscellaneous options::.
  1278.  
  1279. `-orig'
  1280. `--original'
  1281.      Use the original Berkeley coding style.
  1282.      *Note Common styles::.
  1283.  
  1284. `-npro'
  1285. `--ignore-profile'
  1286.      Do not read `.indent.pro' files.
  1287.      *Note Invoking indent::.
  1288.  
  1289. `-pcs'
  1290. `--space-after-procedure-calls'
  1291.      Insert a space between the name of the procedure being called and
  1292.      the `('.
  1293.      *Note Statements::.
  1294.  
  1295. `-piN'
  1296. `--paren-indentationN'
  1297.      Specify the extra indentation per open parentheses '(' when a
  1298.      statement is broken.  *Note Statements::.
  1299.  
  1300. `-pmt'
  1301. `--preserve-mtime'
  1302.      Preserve access and modification times on output files.  *Note
  1303.      Miscellaneous options::.
  1304.  
  1305. `-prs'
  1306. `--space-after-parentheses'
  1307.      Put a space after every '(' and before every ')'.
  1308.      *Note Statements::.
  1309.  
  1310. `-psl'
  1311. `--procnames-start-lines'
  1312.      Put the type of a procedure on the line before its name.
  1313.      *Note Declarations::.
  1314.  
  1315. `-saf'
  1316. `--space-after-for'
  1317.      Put a space after each `for'.
  1318.      *Note Statements::.
  1319.  
  1320. `-sai'
  1321. `--space-after-if'
  1322.      Put a space after each `if'.
  1323.      *Note Statements::.
  1324.  
  1325. `-saw'
  1326. `--space-after-while'
  1327.      Put a space after each `while'.
  1328.      *Note Statements::.
  1329.  
  1330. `-sbiN'
  1331. `--struct-brace-indentationN'
  1332.      Indent braces of a struct, union or enum N spaces.
  1333.      *Note Statements::.
  1334.  
  1335. `-sc'
  1336. `--start-left-side-of-comments'
  1337.      Put the `*' character at the left of comments.
  1338.      *Note Comments::.
  1339.  
  1340. `-sob'
  1341. `--swallow-optional-blank-lines'
  1342.      Swallow optional blank lines.
  1343.      *Note Blank lines::.
  1344.  
  1345. `-ss'
  1346. `--space-special-semicolon'
  1347.      On one-line `for' and `while' statments, force a blank before the
  1348.      semicolon.
  1349.      *Note Statements::.
  1350.  
  1351. `-st'
  1352. `--standard-output'
  1353.      Write to standard output.
  1354.      *Note Invoking indent::.
  1355.  
  1356. `-T'
  1357.      Tell `indent' the name of typenames.
  1358.      *Note Declarations::.
  1359.  
  1360. `-tsN'
  1361. `--tab-sizeN'
  1362.      Set tab size to N spaces.
  1363.      *Note Indentation::.
  1364.  
  1365. `-ut'
  1366. `--use-tabs'
  1367.      Use tabs. This is the default.
  1368.      *Note Indentation::.
  1369.  
  1370. `-v'
  1371. `--verbose'
  1372.      Enable verbose mode.
  1373.      *Note Miscellaneous options::.
  1374.  
  1375. `-version'
  1376.      Output the version number of `indent'.
  1377.      *Note Miscellaneous options::.
  1378.  
  1379. Options' Cross Key
  1380. ------------------
  1381.  
  1382.    Here is a list of options alphabetized by long option, to help you
  1383. find the corresponding short option.
  1384.  
  1385.      --blank-lines-after-commas                      -bc
  1386.      --blank-lines-after-declarations                -bad
  1387.      --blank-lines-after-procedures                  -bap
  1388.      --blank-lines-before-block-comments             -bbb
  1389.      --braces-after-if-line                          -bl
  1390.      --brace-indent                                  -bli
  1391.      --braces-after-struct-decl-line                 -bls
  1392.      --braces-on-if-line                             -br
  1393.      --braces-on-struct-decl-line                    -brs
  1394.      --break-after-boolean-operator                  -nbbo
  1395.      --break-before-boolean-operator                 -bbo
  1396.      --break-function-decl-args                      -bfda
  1397.      --case-indentation                              -cliN
  1398.      --case-brace-indentation                        -cbiN
  1399.      --comment-delimiters-on-blank-lines             -cdb
  1400.      --comment-indentation                           -cN
  1401.      --continuation-indentation                      -ciN
  1402.      --continue-at-parentheses                       -lp
  1403.      --cuddle-do-while                               -cdw
  1404.      --cuddle-else                                   -ce
  1405.      --declaration-comment-column                    -cdN
  1406.      --declaration-indentation                       -diN
  1407.      --dont-break-function-decl-args                 -nbfda
  1408.      --dont-break-procedure-type                     -npsl
  1409.      --dont-cuddle-do-while                          -ncdw
  1410.      --dont-cuddle-else                              -nce
  1411.      --dont-format-comments                          -nfca
  1412.      --dont-format-first-column-comments             -nfc1
  1413.      --dont-line-up-parentheses                      -nlp
  1414.      --dont-space-special-semicolon                  -nss
  1415.      --dont-star-comments                            -nsc
  1416.      --else-endif-column                             -cpN
  1417.      --format-all-comments                           -fca
  1418.      --format-first-column-comments                  -fc1
  1419.      --gnu-style                                     -gnu
  1420.      --honour-newlines                               -hnl
  1421.      --ignore-newlines                               -nhnl
  1422.      --ignore-profile                                -npro
  1423.      --indent-level                                  -iN
  1424.      --k-and-r-style                                 -kr
  1425.      --leave-optional-blank-lines                    -nsob
  1426.      --leave-preprocessor-space                      -lps
  1427.      --line-comments-indentation                     -dN
  1428.      --line-length                                   -lN
  1429.      --no-blank-lines-after-commas                   -nbc
  1430.      --no-blank-lines-after-declarations             -nbad
  1431.      --no-blank-lines-after-procedures               -nbap
  1432.      --no-blank-lines-before-block-comments          -nbbb
  1433.      --no-comment-delimiters-on-blank-lines          -ncdb
  1434.      --no-space-after-casts                          -ncs
  1435.      --no-parameter-indentation                      -nip
  1436.      --no-space-after-for                -nsaf
  1437.      --no-space-after-function-call-names            -npcs
  1438.      --no-space-after-if                -nsai
  1439.      --no-space-after-parentheses                    -nprs
  1440.      --no-space-after-while                -nsaw
  1441.      --no-tabs                                       -nut
  1442.      --no-verbosity                                  -nv
  1443.      --original                                      -orig
  1444.      --parameter-indentation                         -ipN
  1445.      --paren-indentation                             -piN
  1446.      --preserve-mtime                -pmt
  1447.      --procnames-start-lines                         -psl
  1448.      --space-after-cast                              -cs
  1449.      --space-after-for                -saf
  1450.      --space-after-if                -sai
  1451.      --space-after-parentheses                       -prs
  1452.      --space-after-procedure-calls                   -pcs
  1453.      --space-after-while                -saw
  1454.      --space-special-semicolon                       -ss
  1455.      --standard-output                               -st
  1456.      --start-left-side-of-comments                   -sc
  1457.      --struct-brace-indentation                      -sbiN
  1458.      --swallow-optional-blank-lines                  -sob
  1459.      --tab-size                                      -tsN
  1460.      --use-tabs                                      -ut
  1461.      --verbose                                       -v
  1462.  
  1463. 
  1464. File: indent.info,  Node: Index,  Prev: Option Summary,  Up: Top
  1465.  
  1466. Index
  1467. *****
  1468.  
  1469. * Menu:
  1470.  
  1471. * --blank-after-sizeof:                  Statements.
  1472. * --blank-lines-after-commas:            Declarations.
  1473. * --blank-lines-after-declarations:      -bad.
  1474. * --blank-lines-after-procedures:        -bap.
  1475. * --blank-lines-before-block-comments:   Blank lines.
  1476. * --brace-indentN:                       Statements.
  1477. * --braces-after-if-line:                Statements.
  1478. * --braces-on-if-line:                   Statements.
  1479. * --break-after-boolean-operator:        Breaking long lines.
  1480. * --break-before-boolean-operator:       Breaking long lines.
  1481. * --break-function-decl-args:            Declarations.
  1482. * --case-brace-indentationN:             Statements.
  1483. * --case-indentationN:                   Statements.
  1484. * --comment-delimiters-on-blank-lines:   Comments.
  1485. * --comment-indentationN:                Comments.
  1486. * --continuation-indentationN:           Indentation.
  1487. * --continue-at-parentheses:             Indentation.
  1488. * --cuddle-do-while:                     Statements.
  1489. * --cuddle-else:                         Statements.
  1490. * --declaration-comment-columnN:         Comments.
  1491. * --declaration-indentationN:            Declarations.
  1492. * --dont-break-function-decl-args:       Declarations.
  1493. * --dont-break-procedure-type:           Declarations.
  1494. * --dont-cuddle-do-while:                Statements.
  1495. * --dont-cuddle-else:                    Statements.
  1496. * --dont-format-comments:                Comments.
  1497. * --dont-format-first-column-comments:   Comments.
  1498. * --dont-line-up-parentheses:            Indentation.
  1499. * --dont-space-special-semicolon:        Statements.
  1500. * --dont-star-comments:                  Comments.
  1501. * --else-endif-columnN:                  Comments.
  1502. * --format-all-comments:                 Comments.
  1503. * --format-first-column-comments:        Comments.
  1504. * --gnu-style:                           Common styles.
  1505. * --honour-newlines:                     Breaking long lines.
  1506. * --ignore-newlines:                     Breaking long lines.
  1507. * --ignore-profile:                      Invoking indent.
  1508. * --indent-levelN:                       Indentation.
  1509. * --k-and-r-style:                       Common styles.
  1510. * --leave-optional-blank-lines:          Blank lines.
  1511. * --leave-preprocessor-space:            Indentation.
  1512. * --line-comments-indentationN:          Comments.
  1513. * --line-lengthN:                        Breaking long lines.
  1514. * --no-blank-lines-after-commas:         Declarations.
  1515. * --no-blank-lines-after-declarations:   -bad.
  1516. * --no-blank-lines-after-procedures:     -bap.
  1517. * --no-blank-lines-before-block-comments: Blank lines.
  1518. * --no-comment-delimiters-on-blank-lines: Comments.
  1519. * --no-parameter-indentation:            Indentation.
  1520. * --no-space-after-casts:                Statements.
  1521. * --no-space-after-for:                  Statements.
  1522. * --no-space-after-function-call-names:  Statements.
  1523. * --no-space-after-if:                   Statements.
  1524. * --no-space-after-while:                Statements.
  1525. * --no-verbosity:                        Miscellaneous options.
  1526. * --original:                            Common styles.
  1527. * --output-file:                         Invoking indent.
  1528. * --parameter-indentationN:              Indentation.
  1529. * --preserve-mtime:                      Miscellaneous options.
  1530. * --procnames-start-lines:               Declarations.
  1531. * --remove-preprocessor-space:           Indentation.
  1532. * --space-after-cast:                    Statements.
  1533. * --space-after-for:                     Statements.
  1534. * --space-after-if:                      Statements.
  1535. * --space-after-parentheses:             Statements.
  1536. * --space-after-procedure-calls:         Statements.
  1537. * --space-after-while:                   Statements.
  1538. * --space-special-semicolon:             Statements.
  1539. * --standard-output:                     Invoking indent.
  1540. * --star-left-side-of-comments:          Comments.
  1541. * --swallow-optional-blank-lines:        Blank lines.
  1542. * --tab-sizeN:                           Indentation.
  1543. * --verbose:                             Miscellaneous options.
  1544. * -bad:                                  -bad.
  1545. * -bap:                                  -bap.
  1546. * -bbb:                                  Blank lines.
  1547. * -bbo:                                  Breaking long lines.
  1548. * -bc:                                   Declarations.
  1549. * -bfda:                                 Declarations.
  1550. * -bl:                                   Statements.
  1551. * -bliN:                                 Statements.
  1552. * -br:                                   Statements.
  1553. * -bs:                                   Statements.
  1554. * -cbiN:                                 Statements.
  1555. * -cdb:                                  Comments.
  1556. * -cdN:                                  Comments.
  1557. * -cdw:                                  Statements.
  1558. * -ce:                                   Statements.
  1559. * -ciN:                                  Indentation.
  1560. * -cliN:                                 Statements.
  1561. * -cN:                                   Comments.
  1562. * -cpN:                                  Comments.
  1563. * -cs:                                   Statements.
  1564. * -dce:                                  Statements.
  1565. * -diN:                                  Declarations.
  1566. * -dN:                                   Comments.
  1567. * -fc1:                                  Comments.
  1568. * -fca:                                  Comments.
  1569. * -gnu:                                  Common styles.
  1570. * -hnl:                                  Breaking long lines.
  1571. * -iN:                                   Indentation.
  1572. * -ipN:                                  Indentation.
  1573. * -kr:                                   Common styles.
  1574. * -lN:                                   Breaking long lines.
  1575. * -lp:                                   Indentation.
  1576. * -lps:                                  Indentation.
  1577. * -nbad:                                 -bad.
  1578. * -nbap:                                 -bap.
  1579. * -nbbb:                                 Blank lines.
  1580. * -nbbo:                                 Breaking long lines.
  1581. * -nbc:                                  Declarations.
  1582. * -nbfda:                                Declarations.
  1583. * -ncdb:                                 Comments.
  1584. * -ncdw:                                 Statements.
  1585. * -ncs:                                  Statements.
  1586. * -nfc1:                                 Comments.
  1587. * -nfca:                                 Comments.
  1588. * -nhnl:                                 Breaking long lines.
  1589. * -nip:                                  Indentation.
  1590. * -nlp:                                  Indentation.
  1591. * -nlps:                                 Indentation.
  1592. * -npcs:                                 Statements.
  1593. * -npmt:                                 Miscellaneous options.
  1594. * -npro:                                 Invoking indent.
  1595. * -npsl:                                 Declarations.
  1596. * -nsaf:                                 Statements.
  1597. * -nsai:                                 Statements.
  1598. * -nsaw:                                 Statements.
  1599. * -nsc:                                  Comments.
  1600. * -nsob:                                 Blank lines.
  1601. * -nss:                                  Statements.
  1602. * -nv:                                   Miscellaneous options.
  1603. * -o:                                    Invoking indent.
  1604. * -orig:                                 Common styles.
  1605. * -pcs:                                  Statements.
  1606. * -pmt:                                  Miscellaneous options.
  1607. * -prs:                                  Statements.
  1608. * -psl:                                  Declarations.
  1609. * -saf:                                  Statements.
  1610. * -sai:                                  Statements.
  1611. * -saw:                                  Statements.
  1612. * -sc:                                   Comments.
  1613. * -sob:                                  Blank lines.
  1614. * -ss:                                   Statements.
  1615. * -st:                                   Invoking indent.
  1616. * -T:                                    Declarations.
  1617. * -tsN:                                  Indentation.
  1618. * -v:                                    Miscellaneous options.
  1619. * -version:                              Miscellaneous options.
  1620. * .indent.pro file:                      Invoking indent.
  1621. * backup files:                          Backup files.
  1622. * Beginning indent:                      Invoking indent.
  1623. * Berkeley style:                        Common styles.
  1624. * Blank lines:                           Blank lines.
  1625. * Comments:                              Comments.
  1626. * etags requires -psl:                   Declarations.
  1627. * GNU style:                             Common styles.
  1628. * Initialization file:                   Invoking indent.
  1629. * Invoking indent:                       Invoking indent.
  1630. * Kernighan & Ritchie style:             Common styles.
  1631. * Long options, use of:                  Invoking indent.
  1632. * Original Berkeley style:               Common styles.
  1633. * Output File Specification:             Invoking indent.
  1634. * Standard Output:                       Invoking indent.
  1635. * Starting indent:                       Invoking indent.
  1636. * typedef:                               Declarations.
  1637. * Typenames:                             Declarations.
  1638. * Using Standard Input:                  Invoking indent.
  1639.  
  1640.  
  1641. 
  1642. Tag Table:
  1643. Node: Top630
  1644. Node: Indent Program1150
  1645. Node: Invoking indent2233
  1646. Ref: Invoking indent-Footnote-15585
  1647. Node: Backup files5675
  1648. Node: Common styles7754
  1649. Node: Blank lines10015
  1650. Node: -bad11107
  1651. Node: -bap11754
  1652. Node: Comments12615
  1653. Node: Statements17399
  1654. Node: Declarations20996
  1655. Node: Indentation23310
  1656. Node: Breaking long lines26053
  1657. Node: Disabling Formatting28334
  1658. Node: Miscellaneous options30081
  1659. Node: Bugs30974
  1660. Node: Copyright32393
  1661. Node: Option Summary33934
  1662. Node: Index47533
  1663. 
  1664. End Tag Table
  1665.